﻿@model IEnumerable<TGBTech.Core.Models.DanhMuc.HangHoa>

@{
    ViewBag.Title = "Hàng hóa";
}

<div class="row">
    <div class="col-md-12">
        <!-- BEGIN EXAMPLE TABLE PORTLET-->
        <div class="portlet box blue">
            <div class="portlet-title">
                <div class="caption">Hàng hóa</div>
                <div class="tools">
                    <a href="javascript:;" class="collapse"></a>
                    <a href="#portlet-config" data-toggle="modal" class="config"></a>
                    <a href="javascript:;" class="reload"></a>
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <div class="table-toolbar">
                        <a class="btn green" data-toggle="modal" href="#createHangHoa">Thêm mới</a>
                    </div>
                </div>
                <table class="table table-striped table-bordered table-hover" id="tableHangHoa">
                    <thead>
                        <tr>
                            <th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#tableHangHoa .checkboxes" /></th>
                            <th><b>Mã hàng</b></th>
                            <th><b>Tên hàng</b></th>
                            <th></th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var item in Model)
                        {
                            <tr class="odd gradeX">
                                <td><input type="checkbox" class="checkboxes" value="1" /></td>
                                <td>@item.Id</td>
                                <td>@item.Name</td>
                                <td><a data-toggle="modal" class="btnEditHangHoa" id="@item.Id" href="#editHangHoa">Sửa</a></td>
                                <td><a data-toggle="modal" class="btnDeleteHangHoa" id="@item.Id" href="#editHangHoa">Xóa</a></td>
                            </tr>
                        }

                    </tbody>
                </table>
            </div>
        </div>
        <!-- END EXAMPLE TABLE PORTLET-->
    </div>
</div>

<div class="modal fade" id="createHangHoa" tabindex="-1" aria-hidden="false">
    <div class="modal-dialog">
        <div class="modal-body" data-url=@Html.Action("Create")</div>
    </div>
</div>

<div class="modal fade" id="editHangHoa" tabindex="-1" aria-hidden="false">
    <div class="modal-dialog">
        <div class="modal-body" id="bodyEditHangHoa"</div>
    </div>
</div>